package org.mysfit.ctp4j.core.service.impl;

import java.util.List;

import org.modelmapper.ModelMapper;
import org.mysfit.ctp4j.api.vo.FkDataVO;
import org.mysfit.ctp4j.core.service.FkDataService;
import org.mysfit.ctp4j.infra.entity.FkData;
import org.mysfit.ctp4j.infra.mapper.FkDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * fk 服务实现类
 * </p>
 *
 * @author long.gf
 * @since 2022-12-05 12:00:04
 */
@Service
public class FkDataServiceImpl 
	extends AbstractBaseServiceImpl<FkDataMapper, FkData, FkDataVO> 
	implements FkDataService 
{

	@Autowired
	private ModelMapper modelMapper;

	@Autowired
	private FkDataMapper fkMapper;
	
	@Override
	protected ModelMapper getModelMapper() {
		return modelMapper;
	}
	
	@Override
	protected Class<FkDataVO> getVoCLass() {
		return FkDataVO.class;
	}

	@Override
	public List<FkData> getLastFkData(String fid, int count) {
		return fkMapper.getLastFkData(fid, count);
	}

	@Override
	public List<FkData> getLast5FkData(String fid, int count) {
		return fkMapper.getLast5FkData(fid, count);

	}

	@Override
	public List<FkData> getLast15FkData(String fid, int count) {
		return fkMapper.getLast15FkData(fid, count);
	}

	@Override
	public void insertFK(String fid, String startTime, String endTime) {
		fkMapper.insertFK(fid, startTime, endTime);
	}

	@Override
	public void insert5FK(String fid, String startTime, String endTime) {
		fkMapper.insert5FK(fid, startTime, endTime);
	}

	@Override
	public void insert15FK(String fid, String startTime, String endTime) {
		fkMapper.insert15FK(fid, startTime, endTime);
	}

}
